package com.yilin.tms.core.entity.user.hatch;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.tms.core.commons.base.BaseEntity;

import javax.persistence.*;
import java.util.List;

/**
 * 计价规则
 */
@Entity
@Table(name = "hatch_pricing_rule")
@TableName("hatch_pricing_rule")
public class HatchPricingRule extends BaseEntity {
    @Column(name = "plat_id")
    private String platId;
    @Column(name = "plat_name")
    private String platName;

    @Column(name = "comm_truck_type_id", nullable = false)
    private String commTruckTypeId;//车辆类型
    @Column(name = "comm_truck_type_name", nullable = false)
    private String commTruckTypeName;//车辆类型
    @Column(name = "mathematics", nullable = false)
    private int mathematics;//唯一数字标识
    @Column(name = "str_value")
    private String strValue;//说明
    @Column(name = "status")
    private boolean status; //启用
    @Column(name = "matching")
    private boolean matching; //是否撮合
    @Column(name = "price_upper_limit")
    private Double priceUpperLimit; //条件最大值 百分比
    @Column(name = "price_lower_limit")
    private Double priceLowerLimit; //条件最小值 百分比

    @Transient
    @TableField(exist = false)
    private List<HatchPricingRuleItem> ruleItems; //规则项
    @Transient
    @TableField(exist = false)
    private String truckParentId;//父类车辆Id
    @Transient
    @TableField(exist = false)
    private String truckParentName;//父类车辆名称




    public String getPlatId() {
        return platId;
    }

    public void setPlatId(String platId) {
        this.platId = platId;
    }

    public String getPlatName() {
        return platName;
    }

    public void setPlatName(String platName) {
        this.platName = platName;
    }

    public String getTruckParentId() {
        return truckParentId;
    }

    public void setTruckParentId(String truckParentId) {
        this.truckParentId = truckParentId;
    }

    public String getTruckParentName() {
        return truckParentName;
    }

    public void setTruckParentName(String truckParentName) {
        this.truckParentName = truckParentName;
    }

    public Double getPriceUpperLimit() {
        return priceUpperLimit;
    }

    public void setPriceUpperLimit(Double priceUpperLimit) {
        this.priceUpperLimit = priceUpperLimit;
    }

    public Double getPriceLowerLimit() {
        return priceLowerLimit;
    }

    public void setPriceLowerLimit(Double priceLowerLimit) {
        this.priceLowerLimit = priceLowerLimit;
    }

    public int getMathematics() {
        return mathematics;
    }

    public void setMathematics(int mathematics) {
        this.mathematics = mathematics;
    }

    public String getCommTruckTypeId() {
        return commTruckTypeId;
    }

    public void setCommTruckTypeId(String commTruckTypeId) {
        this.commTruckTypeId = commTruckTypeId;
    }

    public String getCommTruckTypeName() {
        return commTruckTypeName;
    }

    public void setCommTruckTypeName(String commTruckTypeName) {
        this.commTruckTypeName = commTruckTypeName;
    }

    public String getStrValue() {
        return strValue;
    }

    public void setStrValue(String strValue) {
        this.strValue = strValue;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public boolean isMatching() {
        return matching;
    }

    public void setMatching(boolean matching) {
        this.matching = matching;
    }


    public List<HatchPricingRuleItem> getRuleItems() {
        return ruleItems;
    }

    public void setRuleItems(List<HatchPricingRuleItem> ruleItems) {
        this.ruleItems = ruleItems;
    }
}

